package com.vito.oa.act.extend.service;

import java.rmi.activation.ActivationException;
import java.util.Map;

import com.vito.act.service.ActivitiMainService;
import com.vito.base.authoriza.model.UserModel;
import com.vito.base.model.Result;

/**
 * 审批控制
 * 
 * @author xuezhennan
 *
 */
public interface OaActivitiMainService extends ActivitiMainService {
	/**
	 * 保存表单并结束流程
	 * 
	 * @param user
	 *            审批人
	 * @param data
	 *            表单信息
	 * @return
	 * @throws Exception ActivationException
	 *             下级审批人未找到抛出
	 */
	public Result saveProcessDataAndEndProcess(UserModel user, Map<String, Map<String, Object>> data) throws Exception;

	/**
	 * 转交
	 * 
	 * @param taskId
	 *            任务ID
	 * @param userId
	 *            被转交人ID
	 */
	public void transfer(String taskId, String userId);

	/**
	 * 同意快捷接口
	 * 
	 * @param user
	 * @param businessId
	 * @param taskId
	 * @throws Exception ActivationException
	 *             下级审批人未找到抛出
	 */
	void fasterCommit(UserModel user, String businessId, String taskId) throws Exception;

	/**
	 * 完结的快捷接口
	 * 
	 * @param user
	 * @param businessId
	 * @param taskId
	 */
	void fasterEnd(UserModel user, String businessId, String taskId);

	/**
	 * 通过业务id组织该节点提交的数据结构，表单内容默认为null
	 * 
	 * @param businessId
	 * @param taskId
	 * @return 供流程提交保存的数据结构
	 */
	public Map<String, Map<String, Object>> packSimpleCommitForm(String businessId, String taskId);

}
